//
//  PayDetail.m
//  xjairOA
//
//  Created by apple on 16-1-8.
//  Copyright (c) 2016年 net. All rights reserved.
//

#import "PayDetail.h"
#import "Constants.h"
#import "AppDelegate.h"

@interface PayDetail ()

@end

@implementation PayDetail
AppDelegate * appDelegate;
NSArray * payDetailData;

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    //self.navigationItem.title=@"2015-12";
    self.navigationItem.title = self.month;
    NSDictionary * params = @{@"id":self.payId};
    appDelegate = [UIApplication sharedApplication].delegate;
    [appDelegate.manager
     POST:paydetail
     parameters:params
     success:^(AFHTTPRequestOperation *operation, id responseObject) {
         payDetailData = responseObject;
         //[tableData addObjectsFromArray:responseObject];
         NSDictionary* dict = [payDetailData objectAtIndex:0];
         //         self.biaoti.text = [dict objectForKey:@"title"];
         //         self.neirong.text = [dict objectForKey:@"desc"];
         self.payModules.text = [dict objectForKey:@"payModules"];
         self.yearPay.text = [dict objectForKey:@"yearPay"];
         self.positionPay.text = [dict objectForKey:@"positionPay"];
         self.performancePay.text = [dict objectForKey:@"performancePay"];
         self.missMeal.text = [dict objectForKey:@"missMeal"];
         self.peformanceCheck.text = [dict objectForKey:@"performanceCheck"];
         self.nightMeal.text = [dict objectForKey:@"nightMeal"];
         self.overtime.text = [dict objectForKey:@"overtime"];
         self.otherSubsidy.text = [dict objectForKey:@"otherSubsidy"];
         self.monthAdd.text = [dict objectForKey:@"monthAdd"];
         self.endowmentInsurance.text =[dict objectForKey:@"endowmentInsurance"];
         self.unemployInsurance.text =[dict objectForKey:@"unemployInsurance"];
         self.daBingStatistic.text =[dict objectForKey:@"daBingStatistic"];
         self.hospitalizationInsurance.text =[dict objectForKey:@"hospitalizationInsurance"];
         self.gongFund.text =[dict objectForKey:@"gongFund"];
         self.incomeTax.text =[dict objectForKey:@"incomeTax"];
         self.reducePerformance.text =[dict objectForKey:@"reducePerformance"];
         self.reducePosition.text =[dict objectForKey:@"reducePosition"];
         self.reduceMissMeal.text =[dict objectForKey:@"reduceMissMeal"];
         self.otherReduce.text =[dict objectForKey:@"otherReduce"];
         self.shouldProvide.text =[dict objectForKey:@"shouldProvide"];
         self.reduceTotal.text =[dict objectForKey:@"reduceTotal"];
         self.trafficSubsidy.text =[dict objectForKey:@"trafficSubsidy"];
         self.communicationSubsidy.text =[dict objectForKey:@"communicationSubsidy"];
         //self.paymentXiShu.text =[dict objectForKey:@""];
         self.payChangeXiShu.text =[dict objectForKey:@"payChangeXiShu"];
         self.changeSubsidy.text =[dict objectForKey:@"changeSubsity"];
         self.jianKuAllowance.text =[dict objectForKey:@"jianKuAllowance"];
     } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
         //NSLog(@"获取服务器响应出错！");
         UIAlertView * alert = [[UIAlertView alloc]
                                initWithTitle:@"提示"
                                message:@"获取服务器响应出错！"
                                delegate:nil
                                cancelButtonTitle:@"确定"
                                otherButtonTitles:nil];
         [alert show];
     }];

}

//- (void)didReceiveMemoryWarning {
//    [super didReceiveMemoryWarning];
//    // Dispose of any resources that can be recreated.
//}

@end
